-- @owner: z@wan005
-- @date: 2021/12/27
-- @testpoint: date类型作为关键字测试，部分测试点合理报错(非保留关键字，不能是函数名)
@connect PrimaryDbBmode;
--step1:作为列名和字段的数据类型;expect:成功
drop table if exists t_date0033 cascade;
create table t_date0033(date date);
--step2:作为索引名;expect:成功
drop index if exists date;
create index date on t_date0033(date);
--step3:删表;expect:成功
drop table if exists t_date0033 cascade;

--step4:作为表名、列名和字段的数据类型;expect:成功
drop table if exists date cascade;
create table date(date date);
drop table if exists date cascade;
--step5:作为数据库名;expect:成功
drop database if exists date;
create database date;
drop database date;
--step6:作为外部数据源名;expect:成功
drop data source if exists date;
create data source date;
drop data source date;
--step7:作为自定义函数名;expect:报错
create or replace function date(i integer)
returns integer
as $$
begin
    return i+1;
end;
$$ language plpgsql;
/
--step8:作为角色名;expect:成功
drop role if exists date;
create role date with password 'Test@123' valid until '2020-12-31';
drop role date;
--step9:作为用户组名;expect:成功
drop group if exists date;
create group date with password 'Test@123';
drop group date;
--step10:作为模式名;expect:成功
drop schema if exists date;
create schema date;
drop schema date;
--step11:作为序列名;expect:成功
drop sequence if exists public.date ;
create sequence public.date start 100 cache 50;
drop sequence public.date;
--step12:作为用户名;expect:成功
drop user if exists date;
create user date password 'bigdata@123';
drop user date;
